3.16 \(\int \frac{d+e x+f x^2}{1+x^2+x^4} \, dx\)
Optimal. Leaf size=104 \[ -\frac{1}{4} (d-f) \log \left (x^2-x+1\right )+\frac{1}{4} (d-f) \log \left (x^2+x+1\right )-\frac{(d+f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{(d+f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{e \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{\sqrt{3}} \]
[Out]
-((d + f)*ArcTan[(1 - 2*x)/Sqrt[3]])/(2*Sqrt[3]) + ((d + f)*ArcTan[(1 + 2*x)/Sqrt[3]])/(2*Sqrt[3]) + (e*ArcTan
[(1 + 2*x^2)/Sqrt[3]])/Sqrt[3] - ((d - f)*Log[1 - x + x^2])/4 + ((d - f)*Log[1 + x + x^2])/4
________________________________________________________________________________________
Rubi [A] time = 0.0848895, antiderivative size = 104, normalized size of antiderivative = 1.,
number of steps used = 14, number of rules used = 8, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.381, Rules used
= {1673, 1169, 634, 618, 204, 628, 12, 1107} \[ -\frac{1}{4} (d-f) \log \left (x^2-x+1\right )+\frac{1}{4} (d-f) \log \left (x^2+x+1\right )-\frac{(d+f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{(d+f) \tan ^{-1}\left (\frac{2 x+1}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{e \tan ^{-1}\left (\frac{2 x^2+1}{\sqrt{3}}\right )}{\sqrt{3}} \]
Antiderivative was successfully verified.
[In]
Int[(d + e*x + f*x^2)/(1 + x^2 + x^4),x]
[Out]
-((d + f)*ArcTan[(1 - 2*x)/Sqrt[3]])/(2*Sqrt[3]) + ((d + f)*ArcTan[(1 + 2*x)/Sqrt[3]])/(2*Sqrt[3]) + (e*ArcTan
[(1 + 2*x^2)/Sqrt[3]])/Sqrt[3] - ((d - f)*Log[1 - x + x^2])/4 + ((d - f)*Log[1 + x + x^2])/4
Rule 1673
Int[(Pq_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Module[{q = Expon[Pq, x], k}, Int[Sum[Coeff[
Pq, x, 2*k]*x^(2*k), {k, 0, q/2}]*(a + b*x^2 + c*x^4)^p, x] + Int[x*Sum[Coeff[Pq, x, 2*k + 1]*x^(2*k), {k, 0,
(q - 1)/2}]*(a + b*x^2 + c*x^4)^p, x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && !PolyQ[Pq, x^2]
Rule 1169
Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]
Rule 634
Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && !NiceSqrtQ[b^2 - 4*a*c]
Rule 618
Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 204
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])
Rule 628
Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]
Rule 12
Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] && !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]
Rule 1107
Int[(x_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Dist[1/2, Subst[Int[(a + b*x + c*x^2)^p, x],
x, x^2], x] /; FreeQ[{a, b, c, p}, x]
Rubi steps
\begin{align*} \int \frac{d+e x+f x^2}{1+x^2+x^4} \, dx &=\int \frac{e x}{1+x^2+x^4} \, dx+\int \frac{d+f x^2}{1+x^2+x^4} \, dx\\ &=\frac{1}{2} \int \frac{d-(d-f) x}{1-x+x^2} \, dx+\frac{1}{2} \int \frac{d+(d-f) x}{1+x+x^2} \, dx+e \int \frac{x}{1+x^2+x^4} \, dx\\ &=\frac{1}{2} e \operatorname{Subst}\left (\int \frac{1}{1+x+x^2} \, dx,x,x^2\right )+\frac{1}{4} (d-f) \int \frac{1+2 x}{1+x+x^2} \, dx+\frac{1}{4} (-d+f) \int \frac{-1+2 x}{1-x+x^2} \, dx+\frac{1}{4} (d+f) \int \frac{1}{1-x+x^2} \, dx+\frac{1}{4} (d+f) \int \frac{1}{1+x+x^2} \, dx\\ &=-\frac{1}{4} (d-f) \log \left (1-x+x^2\right )+\frac{1}{4} (d-f) \log \left (1+x+x^2\right )-e \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x^2\right )+\frac{1}{2} (-d-f) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,-1+2 x\right )+\frac{1}{2} (-d-f) \operatorname{Subst}\left (\int \frac{1}{-3-x^2} \, dx,x,1+2 x\right )\\ &=-\frac{(d+f) \tan ^{-1}\left (\frac{1-2 x}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{(d+f) \tan ^{-1}\left (\frac{1+2 x}{\sqrt{3}}\right )}{2 \sqrt{3}}+\frac{e \tan ^{-1}\left (\frac{1+2 x^2}{\sqrt{3}}\right )}{\sqrt{3}}-\frac{1}{4} (d-f) \log \left (1-x+x^2\right )+\frac{1}{4} (d-f) \log \left (1+x+x^2\right )\\ \end{align*}
Mathematica [C] time = 0.138965, size = 121, normalized size = 1.16 \[ \frac{\left (2 i d+\left (\sqrt{3}-i\right ) f\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}-i\right ) x\right )}{\sqrt{6+6 i \sqrt{3}}}+\frac{\left (\left (\sqrt{3}+i\right ) f-2 i d\right ) \tan ^{-1}\left (\frac{1}{2} \left (\sqrt{3}+i\right ) x\right )}{\sqrt{6-6 i \sqrt{3}}}-\frac{e \tan ^{-1}\left (\frac{\sqrt{3}}{2 x^2+1}\right )}{\sqrt{3}} \]
Warning: Unable to verify antiderivative.
[In]
Integrate[(d + e*x + f*x^2)/(1 + x^2 + x^4),x]
[Out]
(((2*I)*d + (-I + Sqrt[3])*f)*ArcTan[((-I + Sqrt[3])*x)/2])/Sqrt[6 + (6*I)*Sqrt[3]] + (((-2*I)*d + (I + Sqrt[3
])*f)*ArcTan[((I + Sqrt[3])*x)/2])/Sqrt[6 - (6*I)*Sqrt[3]] - (e*ArcTan[Sqrt[3]/(1 + 2*x^2)])/Sqrt[3]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 148, normalized size = 1.4 \begin{align*}{\frac{d\ln \left ({x}^{2}+x+1 \right ) }{4}}-{\frac{\ln \left ({x}^{2}+x+1 \right ) f}{4}}+{\frac{d\sqrt{3}}{6}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }-{\frac{\sqrt{3}e}{3}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{6}\arctan \left ({\frac{ \left ( 1+2\,x \right ) \sqrt{3}}{3}} \right ) }+{\frac{\ln \left ({x}^{2}-x+1 \right ) f}{4}}-{\frac{d\ln \left ({x}^{2}-x+1 \right ) }{4}}+{\frac{d\sqrt{3}}{6}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}e}{3}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) }+{\frac{\sqrt{3}f}{6}\arctan \left ({\frac{ \left ( 2\,x-1 \right ) \sqrt{3}}{3}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int((f*x^2+e*x+d)/(x^4+x^2+1),x)
[Out]
1/4*d*ln(x^2+x+1)-1/4*ln(x^2+x+1)*f+1/6*d*arctan(1/3*(1+2*x)*3^(1/2))*3^(1/2)-1/3*3^(1/2)*arctan(1/3*(1+2*x)*3
^(1/2))*e+1/6*3^(1/2)*arctan(1/3*(1+2*x)*3^(1/2))*f+1/4*ln(x^2-x+1)*f-1/4*d*ln(x^2-x+1)+1/6*3^(1/2)*arctan(1/3
*(2*x-1)*3^(1/2))*d+1/3*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*e+1/6*3^(1/2)*arctan(1/3*(2*x-1)*3^(1/2))*f
________________________________________________________________________________________
Maxima [A] time = 1.43683, size = 101, normalized size = 0.97 \begin{align*} \frac{1}{6} \, \sqrt{3}{\left (d - 2 \, e + f\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{6} \, \sqrt{3}{\left (d + 2 \, e + f\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((f*x^2+e*x+d)/(x^4+x^2+1),x, algorithm="maxima")
[Out]
1/6*sqrt(3)*(d - 2*e + f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e + f)*arctan(1/3*sqrt(3)*(2*x -
1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1/4*(d - f)*log(x^2 - x + 1)
________________________________________________________________________________________
Fricas [A] time = 1.77454, size = 239, normalized size = 2.3 \begin{align*} \frac{1}{6} \, \sqrt{3}{\left (d - 2 \, e + f\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{6} \, \sqrt{3}{\left (d + 2 \, e + f\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((f*x^2+e*x+d)/(x^4+x^2+1),x, algorithm="fricas")
[Out]
1/6*sqrt(3)*(d - 2*e + f)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + 2*e + f)*arctan(1/3*sqrt(3)*(2*x -
1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1/4*(d - f)*log(x^2 - x + 1)
________________________________________________________________________________________
Sympy [C] time = 26.5424, size = 3589, normalized size = 34.51 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((f*x**2+e*x+d)/(x**4+x**2+1),x)
[Out]
(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)*log(x + (-7*d**5*e + 6*d**5*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12
) + 25*d**4*e*f + 18*d**4*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 15*d**3*e**3 - 18*d**3*e**2*(-d/4 + f/
4 - sqrt(3)*I*(d + 2*e + f)/12) - 25*d**3*e*f**2 + 60*d**3*e*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 - 42
*d**3*f**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 72*d**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**3 +
108*d**2*e**2*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 20*d**2*e*f**3 - 144*d**2*e*f*(-d/4 + f/4 - sqrt(3
)*I*(d + 2*e + f)/12)**2 - 12*d**2*f**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 144*d**2*f*(-d/4 + f/4 - s
qrt(3)*I*(d + 2*e + f)/12)**3 + 4*d*e**5 + 24*d*e**4*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 15*d*e**3*f**
2 + 48*d*e**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 - 54*d*e**2*f**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e +
f)/12) + 288*d*e**2*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**3 - 20*d*e*f**4 + 180*d*e*f**2*(-d/4 + f/4 - s
qrt(3)*I*(d + 2*e + f)/12)**2 + 36*d*f**4*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) - 72*d*f**2*(-d/4 + f/4 -
sqrt(3)*I*(d + 2*e + f)/12)**3 - 8*e**5*f - 96*e**3*f*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**2 + 36*e**2*f
**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 11*e*f**5 - 48*e*f**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12
)**2 - 6*f**5*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12) + 144*f**3*(-d/4 + f/4 - sqrt(3)*I*(d + 2*e + f)/12)**
3)/(3*d**6 - 3*d**5*f - 8*d**4*e**2 - 3*d**4*f**2 + 40*d**3*e**2*f + 6*d**3*f**3 - 16*d**2*e**4 - 48*d**2*e**2
*f**2 - 3*d**2*f**4 + 16*d*e**4*f + 40*d*e**2*f**3 - 3*d*f**5 - 16*e**4*f**2 - 8*e**2*f**4 + 3*f**6)) + (-d/4
+ f/4 + sqrt(3)*I*(d + 2*e + f)/12)*log(x + (-7*d**5*e + 6*d**5*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 25
*d**4*e*f + 18*d**4*f*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) - 15*d**3*e**3 - 18*d**3*e**2*(-d/4 + f/4 + sq
rt(3)*I*(d + 2*e + f)/12) - 25*d**3*e*f**2 + 60*d**3*e*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**2 - 42*d**3*
f**2*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 72*d**3*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**3 + 108*d*
*2*e**2*f*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 20*d**2*e*f**3 - 144*d**2*e*f*(-d/4 + f/4 + sqrt(3)*I*(d
+ 2*e + f)/12)**2 - 12*d**2*f**3*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) - 144*d**2*f*(-d/4 + f/4 + sqrt(3)
*I*(d + 2*e + f)/12)**3 + 4*d*e**5 + 24*d*e**4*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 15*d*e**3*f**2 + 48
*d*e**3*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**2 - 54*d*e**2*f**2*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12
) + 288*d*e**2*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**3 - 20*d*e*f**4 + 180*d*e*f**2*(-d/4 + f/4 + sqrt(3)
*I*(d + 2*e + f)/12)**2 + 36*d*f**4*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) - 72*d*f**2*(-d/4 + f/4 + sqrt(3
)*I*(d + 2*e + f)/12)**3 - 8*e**5*f - 96*e**3*f*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**2 + 36*e**2*f**3*(-
d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 11*e*f**5 - 48*e*f**3*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**2 -
6*f**5*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12) + 144*f**3*(-d/4 + f/4 + sqrt(3)*I*(d + 2*e + f)/12)**3)/(3*
d**6 - 3*d**5*f - 8*d**4*e**2 - 3*d**4*f**2 + 40*d**3*e**2*f + 6*d**3*f**3 - 16*d**2*e**4 - 48*d**2*e**2*f**2
- 3*d**2*f**4 + 16*d*e**4*f + 40*d*e**2*f**3 - 3*d*f**5 - 16*e**4*f**2 - 8*e**2*f**4 + 3*f**6)) + (d/4 - f/4 -
sqrt(3)*I*(d - 2*e + f)/12)*log(x + (-7*d**5*e + 6*d**5*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) + 25*d**4*e*
f + 18*d**4*f*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) - 15*d**3*e**3 - 18*d**3*e**2*(d/4 - f/4 - sqrt(3)*I*(d
- 2*e + f)/12) - 25*d**3*e*f**2 + 60*d**3*e*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**2 - 42*d**3*f**2*(d/4 -
f/4 - sqrt(3)*I*(d - 2*e + f)/12) + 72*d**3*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**3 + 108*d**2*e**2*f*(d/
4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) + 20*d**2*e*f**3 - 144*d**2*e*f*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)
**2 - 12*d**2*f**3*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) - 144*d**2*f*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/
12)**3 + 4*d*e**5 + 24*d*e**4*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) + 15*d*e**3*f**2 + 48*d*e**3*(d/4 - f/4
- sqrt(3)*I*(d - 2*e + f)/12)**2 - 54*d*e**2*f**2*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) + 288*d*e**2*(d/4
- f/4 - sqrt(3)*I*(d - 2*e + f)/12)**3 - 20*d*e*f**4 + 180*d*e*f**2*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**
2 + 36*d*f**4*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12) - 72*d*f**2*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**3
- 8*e**5*f - 96*e**3*f*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**2 + 36*e**2*f**3*(d/4 - f/4 - sqrt(3)*I*(d -
2*e + f)/12) + 11*e*f**5 - 48*e*f**3*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**2 - 6*f**5*(d/4 - f/4 - sqrt(3
)*I*(d - 2*e + f)/12) + 144*f**3*(d/4 - f/4 - sqrt(3)*I*(d - 2*e + f)/12)**3)/(3*d**6 - 3*d**5*f - 8*d**4*e**2
- 3*d**4*f**2 + 40*d**3*e**2*f + 6*d**3*f**3 - 16*d**2*e**4 - 48*d**2*e**2*f**2 - 3*d**2*f**4 + 16*d*e**4*f +
40*d*e**2*f**3 - 3*d*f**5 - 16*e**4*f**2 - 8*e**2*f**4 + 3*f**6)) + (d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)*
log(x + (-7*d**5*e + 6*d**5*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) + 25*d**4*e*f + 18*d**4*f*(d/4 - f/4 + sq
rt(3)*I*(d - 2*e + f)/12) - 15*d**3*e**3 - 18*d**3*e**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) - 25*d**3*e*f
**2 + 60*d**3*e*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**2 - 42*d**3*f**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f
)/12) + 72*d**3*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**3 + 108*d**2*e**2*f*(d/4 - f/4 + sqrt(3)*I*(d - 2*e
+ f)/12) + 20*d**2*e*f**3 - 144*d**2*e*f*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**2 - 12*d**2*f**3*(d/4 - f/4
+ sqrt(3)*I*(d - 2*e + f)/12) - 144*d**2*f*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**3 + 4*d*e**5 + 24*d*e**4
*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) + 15*d*e**3*f**2 + 48*d*e**3*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12
)**2 - 54*d*e**2*f**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) + 288*d*e**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e +
f)/12)**3 - 20*d*e*f**4 + 180*d*e*f**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**2 + 36*d*f**4*(d/4 - f/4 + sq
rt(3)*I*(d - 2*e + f)/12) - 72*d*f**2*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**3 - 8*e**5*f - 96*e**3*f*(d/4
- f/4 + sqrt(3)*I*(d - 2*e + f)/12)**2 + 36*e**2*f**3*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) + 11*e*f**5 - 4
8*e*f**3*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**2 - 6*f**5*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12) + 144*f
**3*(d/4 - f/4 + sqrt(3)*I*(d - 2*e + f)/12)**3)/(3*d**6 - 3*d**5*f - 8*d**4*e**2 - 3*d**4*f**2 + 40*d**3*e**2
*f + 6*d**3*f**3 - 16*d**2*e**4 - 48*d**2*e**2*f**2 - 3*d**2*f**4 + 16*d*e**4*f + 40*d*e**2*f**3 - 3*d*f**5 -
16*e**4*f**2 - 8*e**2*f**4 + 3*f**6))
________________________________________________________________________________________
Giac [A] time = 1.09702, size = 104, normalized size = 1. \begin{align*} \frac{1}{6} \, \sqrt{3}{\left (d + f - 2 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x + 1\right )}\right ) + \frac{1}{6} \, \sqrt{3}{\left (d + f + 2 \, e\right )} \arctan \left (\frac{1}{3} \, \sqrt{3}{\left (2 \, x - 1\right )}\right ) + \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} + x + 1\right ) - \frac{1}{4} \,{\left (d - f\right )} \log \left (x^{2} - x + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate((f*x^2+e*x+d)/(x^4+x^2+1),x, algorithm="giac")
[Out]
1/6*sqrt(3)*(d + f - 2*e)*arctan(1/3*sqrt(3)*(2*x + 1)) + 1/6*sqrt(3)*(d + f + 2*e)*arctan(1/3*sqrt(3)*(2*x -
1)) + 1/4*(d - f)*log(x^2 + x + 1) - 1/4*(d - f)*log(x^2 - x + 1)